﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CosmosKernel4.Global.Types
{
    class Map
    {
        List<Object> Keys = null;
        List<Object> Vals = null;
        public Map()
        {
            Keys = new List<Object>();
            Vals = new List<Object>();
        }
        public object get(object key)
        {
            if (Keys.IndexOf(key) != -1)
            {
                return Vals[Keys.IndexOf(key)];
            }
            return null;
        }
        public void add(Object key, Object val)
        {
            if (Keys.IndexOf(key) == -1)
            {
                Keys.Add(key);
                Vals.Add(val);
            }
        }
        public void remove(Object Key)
        {
            int index = Keys.IndexOf(Key);
            Keys.RemoveAt(index);
            Vals.RemoveAt(index);
        }
        public void clear()
        {
            Keys = new List<Object>();
            Vals = new List<Object>();
        }

    }
}
